Conventionally, in a system including a rotary electric machine, an abnormal state such as an abnormality in voltage is detected and a fail-safe function is operated to control the rotary electric machine to be on a safe side (see, for example, Patent Literature 1). Patent Literature 1 discloses that when it is determined that an output circuit of the rotary electric machine is in an overvoltage state, the rotary electric machine is caused to be in a phase short-circuit state by controlling an electric power conversion device, so that a short-circuit current flows through the rotary electric machine. Thus, even when a sudden rise in voltage occurs in a charging path of a control circuit during operation of the rotary electric machine as a power generator, the overvoltage is suppressed and the voltage is also promptly reduced to prevent breakage or the like of circuit elements and devices.